package day19;

import java.util.Arrays;

public class Homework1 {
    public static void main(String[] args) {
        StringBuilder sb= new StringBuilder("abcdefg");
        System.out.println("反转前："+sb);
        sb.reverse();
        System.out.println("反转后："+sb);
    }
}

class demo1{
    public static void main(String[] args) {
        String[] strings = {"Hello", "world", "HELLO", "HeLLo", "hello123", "Goodbye", "heLLo!"};
        int count = 0;
        String strs = "hello";
        for (String str : strings) {
            if (str != null && str.toLowerCase().contains(strs)) {
                count++;
            }
        }
        System.out.println("出现的次数为："+count);
    }
}

interface Test{
      public String doTest(Object obj);
}
class Demo21 implements Test{
    public String doTest(Object obj) {
        return obj.toString();
    }

    public static void main(String[] args) {
        Demo21 demo2=new Demo21();
        String str=demo2.doTest("你好");
        System.out.println(str);
        System. out.printf("%03d*",99);
    }

}
